<template>
  <div>
    <table class="table">
      <tr>
        <th>用户名</th>
        <th>手机号码</th>
        <th>回访计划时间</th>
        <th>备注</th>
        <th>回访结果</th>
      </tr>
      <template v-if="list && list.length > 0">
        <tr v-for="(item,index) in list" :key="index">
          <td>{{item.userName}}</td>
          <td>{{item.tel}}</td>
          <td>{{item.hftime}}</td>
          <td>
              <a href="javascript:;" class="check" @click="handleCheck(item.beizhu)">点击查看</a>
          </td>
          <td>{{item.jieguo}}</td>
        </tr>
      </template>
    </table>
    <p v-if="list === null || list.length === 0" :class="$style.empty">暂无记录</p>
    <!-- <el-pagination v-else-if="Ptyj.nums > 0" layout="prev, pager, next" :page-size="10" :total="Ptyj.list" :current-change="handleChangePage" :class="textRight">
    </el-pagination> -->
  </div>
</template>

<script>
export default {
  name:'log-table-back',
  data(){
    return {
      list: []
    }
  },
  mounted(){
    this.getBack()
  },
  methods: {
    handleCheck(content){
      this.$emit('onCheckOpen',content)
    },
    async getBack(){
      try{
        const mobile = this.$store.getters.callMsg.mobile
        const {data} = await this.$get(this,{
          api: 'ajaxapi/getHfjl1.do',
          data: {
            mobile
          }
        })
        if(data.state === 0){
          this.list = data.content
          return
        }
      }catch(e){
        this.$warn('系统ajaxapi/getHfjl1.do接口报错')
      }
    }
  }
}
</script>

<style lang="scss" module>
.empty{
  padding:15px;
  text-align:center;
}
</style>


<style lang="scss" scoped>
$tableBorderColor:#dddfe6;
$tableBgColor:#fff;
.table {
    width: 100%;
    border:1px solid $tableBorderColor;
    table-layout: fixed;
    tr{
      border-top:1px solid $tableBorderColor;
    }
    th,
    td {
      background: $tableBgColor;
      text-align: center;
      height: 60px;
      line-height: 60px;
    }
    th{
      font-weight: normal;
      font-size:16px;
      color:#444;
    }
    td{
      font-size:14px;
      color:#7b8897;
    }
  }
.check {
    $checkColor: #5394fc;
    color: $checkColor;
    border-bottom: 1px solid $checkColor;
  }
</style>
